package com.example.tests;

import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.Matchers.*;

import org.testng.annotations.Test;

import com.example.fw.Folders;

public class TestFolderRemoval extends TestBase {

	@Test
	public void testFolderRemoval() {
		String folder = "newfolder";
		Folders oldFolders = app.getFolderHelper().getFolders(); 
		app.getFolderHelper().createFolder(folder);
		Folders newFolders = app.getFolderHelper().getFolders(); 
		assertThat(newFolders, equalTo(oldFolders.withAdded(folder)));
		
		app.getFolderHelper().deleteFolder(1);
		Folders superNewFolders = app.getFolderHelper().getFolders(); 
		assertThat(superNewFolders, equalTo(oldFolders));
	}
}
